package com.heima.common.util;

import com.heima.common.entity.User;

public class MediaThreadLocal {
    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();
//    获取user
    public static User get(){
        return threadLocal.get();
    }
//    存入user
    public static void   set(User user){
        threadLocal.set(user);
    }
//    移除user
    public static void remove(){
        threadLocal.remove();
    }

}
